package cn.liccshop.core.service.shopProducts.controller;


import cn.liccshop.core.entity.ShopProducts;
import cn.liccshop.core.service.shopProducts.service.IShopProductsService;
import cn.liccshop.sys.constants.Constants;
import cn.liccshop.sys.entity.Result;
import cn.liccshop.sys.exception.MySystemException;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;
import cn.liccshop.sys.base.MyActionController;

import java.util.Map;

/**
 * @description 商品基本属性表 前端控制器
 *
 * @author LiCC
 * @since 2019-04-08
 */
@RestController
@RequestMapping("/shopProducts")
public class ShopProductsController extends MyActionController<ShopProducts> {

    @Autowired
    private IShopProductsService liShopProductsService;

    @Override
    protected IService<ShopProducts> getLiService(){
        return liShopProductsService;
    }

    @RequestMapping(value = "saveInfos")
    public Result saveShopProductsInfos(@RequestBody Map<String, Object> map) throws MySystemException {
        boolean isSuccess = liShopProductsService.saveInfos(map);
        return new Result().setCode(Constants.OK).setMessage("操作成功");
    }

}

